﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.ZJK
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.ZJK;

    public class ZJ_expert_map : EntityMapping<ZJ_expert>
    {
        public ZJ_expert_map()
        {
            Property(x => x.zj_area, map =>
            {
                map.Column(ZJ_expert.Columns.zj_area);
                map.Length(40);
            });


            Property(x => x.zj_birthdate_y, map =>
            {
                map.Column(ZJ_expert.Columns.zj_birthdate_y);
                map.Length(4);
            });

            Property(x => x.zj_birthdate_m, map =>
            {
                map.Column(ZJ_expert.Columns.zj_birthdate_m);
                map.Length(2);
            });

            Property(x => x.zj_city, map =>
            {
                map.Column(ZJ_expert.Columns.zj_city);
                map.Length(40);
            });

            Property(x => x.zj_company, map =>
            {
                map.Column(ZJ_expert.Columns.zj_company);
                map.Length(200);
            });

            Property(x => x.zj_content_and_product, map =>
            {
                map.Column(ZJ_expert.Columns.zj_content_and_product);
                map.Length(200);
            });

            Property(x => x.zj_degree, map =>
            {
                map.Column(ZJ_expert.Columns.zj_degree);
                map.Length(200);
            });

            Property(x => x.zj_education, map =>
            {
                map.Column(ZJ_expert.Columns.zj_education);
                map.Length(200);
            });

            Property(x => x.zj_email, map =>
            {
                map.Column(ZJ_expert.Columns.zj_email);
                map.Length(200);
            });

            Property(x => x.zj_fax, map =>
            {
                map.Column(ZJ_expert.Columns.zj_fax);
                map.Length(100);
            });

            Property(x => x.zj_graduation, map =>
            {
                map.Column(ZJ_expert.Columns.zj_graduation);
                map.Length(200);
            });

            Property(x => x.zj_idcard_number, map =>
            {
                map.Column(ZJ_expert.Columns.zj_idcard_number);
                map.Length(20);
            });

            Property(x => x.zj_level, map =>
            {
                map.Column(ZJ_expert.Columns.zj_level);
                map.Length(10);
            });

            Property(x => x.zj_mail_address, map =>
            {
                map.Column(ZJ_expert.Columns.zj_mail_address);
                map.Length(200);
            });

            Property(x => x.zj_mobile, map =>
            {
                map.Column(ZJ_expert.Columns.zj_mobile);
                map.Length(20);
            });

            Property(x => x.zj_name, map =>
            {
                map.Column(ZJ_expert.Columns.zj_name);
                map.Length(20);
            });

            Property(x => x.zj_position, map =>
            {
                map.Column(ZJ_expert.Columns.zj_position);
                map.Length(20);
            });

            Property(x => x.zj_professional, map =>
            {
                map.Column(ZJ_expert.Columns.zj_professional);
                map.Length(400);
            });

            Property(x => x.zj_sex, map =>
            {
                map.Column(ZJ_expert.Columns.zj_sex);
                map.Length(2);
            });

            Property(x => x.zj_title, map =>
            {
                map.Column(ZJ_expert.Columns.zj_title);
                map.Length(200);
            });

            Property(x => x.zj_tele_home, map =>
            {
                map.Column(ZJ_expert.Columns.zj_tele_home);
                map.Length(20);
            });

            Property(x => x.zj_tele_work, map =>
            {
                map.Column(ZJ_expert.Columns.zj_tele_work);
                map.Length(20);
            });

            Property(x => x.zj_resume, map =>
            {
                map.Column(ZJ_expert.Columns.zj_resume);
                map.Length(8000);
            });

            Property(x => x.zj_recommend_department, map =>
            {
                map.Column(ZJ_expert.Columns.zj_recommend_department);
                map.Length(200);
            });

            Property(x => x.zj_recommend_describe, map =>
            {
                map.Column(ZJ_expert.Columns.zj_recommend_describe);
                map.Length(8000);
            });

            Property(x => x.zj_stop_status, map =>
            {
                map.Column(ZJ_expert.Columns.zj_stop_status);
            });

            Property(x => x.zj_stop_describe, map =>
            {
                map.Column(ZJ_expert.Columns.zj_stop_describe);
                map.Length(8000);
            });

            //专家分类
            Bag(x => x.zj_categorys, map => { }, act => act.ManyToMany());

            Table(ZJ_expert.TableName);
        }
    }
}
